<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{wfJobMasterBean.id}"/>
		<f:event type="preRenderView" listener="#{wfJobMasterBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Wf Job Master"/>

	<ui:define name="header">
		Wf Job Master
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty wfJobMasterBean.id}">
				Edit existing Wf Job Master
			</c:when>
			<c:otherwise>
				Create a new Wf Job Master
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmNo" value="Jm No:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmNo" required="true" value="#{wfJobMasterBean.wfJobMaster.jmNo}"/>
					<h:message for="wfJobMasterBeanWfJobMasterJmNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterHrEmp" value="Hr Emp:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpBean.converter}" id="wfJobMasterBeanWfJobMasterHrEmp" value="#{wfJobMasterBean.wfJobMaster.hrEmp}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="wfJobMasterBeanWfJobMasterHrEmp" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterWfWorkstation" value="Wf Workstation:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{wfWorkstationBean.converter}" id="wfJobMasterBeanWfJobMasterWfWorkstation" value="#{wfJobMasterBean.wfJobMaster.wfWorkstation}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfWorkstationBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="wfJobMasterBeanWfJobMasterWfWorkstation" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmCode" value="Jm Code:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmCode" maxLength="50" value="#{wfJobMasterBean.wfJobMaster.jmCode}"/>
					<h:message for="wfJobMasterBeanWfJobMasterJmCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmDescr" value="Jm Descr:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmDescr" maxLength="300" value="#{wfJobMasterBean.wfJobMaster.jmDescr}"/>
					<h:message for="wfJobMasterBeanWfJobMasterJmDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmCreatedDtm" value="Jm Created Dtm:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmCreatedDtm" maxLength="19" value="#{wfJobMasterBean.wfJobMaster.jmCreatedDtm}">
						<f:convertDateTime pattern="MMM d, yyyy hh:mm:ss a" type="both"/>
					</h:inputText>
					<h:message for="wfJobMasterBeanWfJobMasterJmCreatedDtm" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmIsActive" value="Jm Is Active:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmIsActive" value="#{wfJobMasterBean.wfJobMaster.jmIsActive}"/>
					<h:message for="wfJobMasterBeanWfJobMasterJmIsActive" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmEffectiveDate" value="Jm Effective Date:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmEffectiveDate" maxLength="10" value="#{wfJobMasterBean.wfJobMaster.jmEffectiveDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="wfJobMasterBeanWfJobMasterJmEffectiveDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterJmExpireDate" value="Jm Expire Date:"/>
				<h:panelGroup>
					<h:inputText id="wfJobMasterBeanWfJobMasterJmExpireDate" maxLength="10" value="#{wfJobMasterBean.wfJobMaster.jmExpireDate}">
						<f:convertDateTime type="date"/>
					</h:inputText>
					<h:message for="wfJobMasterBeanWfJobMasterJmExpireDate" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterWfFlowTransLines" value="Wf Flow Trans Lines:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{wfJobMasterBean.wfJobMaster.wfFlowTransLines}"/>
					<h:dataTable id="wfJobMasterBeanWfJobMasterWfFlowTransLines" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Flow Trans"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfFlowTrans" value="#{forgeview:display(_item.wfFlowTrans)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfFlowTransBean.converter}" id="wfFlowTransLineBeanAddWfFlowTrans" value="#{wfFlowTransLineBean.add.wfFlowTrans}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfFlowTransBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfFlowTrans" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Flow Status"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfFlowStatus" value="#{forgeview:display(_item.wfFlowStatus)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfFlowStatusBean.converter}" id="wfFlowTransLineBeanAddWfFlowStatus" value="#{wfFlowTransLineBean.add.wfFlowStatus}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfFlowStatusBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfFlowStatus" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Workstation"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfWorkstation" value="#{forgeview:display(_item.wfWorkstation)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfWorkstationBean.converter}" id="wfFlowTransLineBeanAddWfWorkstation" value="#{wfFlowTransLineBean.add.wfWorkstation}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfWorkstationBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddWfWorkstation" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Hr Emp"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemHrEmp" value="#{forgeview:display(_item.hrEmp)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{hrEmpBean.converter}" id="wfFlowTransLineBeanAddHrEmp" value="#{wfFlowTransLineBean.add.hrEmp}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowTransLineBeanAddHrEmp" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Ft Flow Seq No"/>
							</f:facet>
							<h:link outcome="/wfFlowTransLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemFtFlowSeqNo" value="#{_item.ftFlowSeqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="wfFlowTransLineBeanAddFtFlowSeqNo" value="#{wfFlowTransLineBean.add.ftFlowSeqNo}"/>
								<h:message for="wfFlowTransLineBeanAddFtFlowSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(wfFlowTransLineBean.added)}" id="wfJobMasterBeanWfJobMasterWfFlowTransLinesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{wfFlowTransLineBean.add.wfJobMaster}" value="#{wfJobMasterBean.wfJobMaster}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="wfJobMasterBeanWfJobMasterWfFlowMasterLines" value="Wf Flow Master Lines:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{wfJobMasterBean.wfJobMaster.wfFlowMasterLines}"/>
					<h:dataTable id="wfJobMasterBeanWfJobMasterWfFlowMasterLines" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Workstation"/>
							</f:facet>
							<h:link outcome="/wfFlowMasterLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfWorkstation" value="#{forgeview:display(_item.wfWorkstation)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfWorkstationBean.converter}" id="wfFlowMasterLineBeanAddWfWorkstation" value="#{wfFlowMasterLineBean.add.wfWorkstation}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfWorkstationBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowMasterLineBeanAddWfWorkstation" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Flow Master"/>
							</f:facet>
							<h:link outcome="/wfFlowMasterLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfFlowMaster" value="#{forgeview:display(_item.wfFlowMaster)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfFlowMasterBean.converter}" id="wfFlowMasterLineBeanAddWfFlowMaster" value="#{wfFlowMasterLineBean.add.wfFlowMaster}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfFlowMasterBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowMasterLineBeanAddWfFlowMaster" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Wf Flow Status"/>
							</f:facet>
							<h:link outcome="/wfFlowMasterLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemWfFlowStatus" value="#{forgeview:display(_item.wfFlowStatus)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{wfFlowStatusBean.converter}" id="wfFlowMasterLineBeanAddWfFlowStatus" value="#{wfFlowMasterLineBean.add.wfFlowStatus}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{wfFlowStatusBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="wfFlowMasterLineBeanAddWfFlowStatus" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Fm Flow Seq No"/>
							</f:facet>
							<h:link outcome="/wfFlowMasterLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemFmFlowSeqNo" value="#{_item.fmFlowSeqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="wfFlowMasterLineBeanAddFmFlowSeqNo" value="#{wfFlowMasterLineBean.add.fmFlowSeqNo}"/>
								<h:message for="wfFlowMasterLineBeanAddFmFlowSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Fm Flow Next Seq No"/>
							</f:facet>
							<h:link outcome="/wfFlowMasterLine/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemFmFlowNextSeqNo" value="#{_item.fmFlowNextSeqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="wfFlowMasterLineBeanAddFmFlowNextSeqNo" value="#{wfFlowMasterLineBean.add.fmFlowNextSeqNo}"/>
								<h:message for="wfFlowMasterLineBeanAddFmFlowNextSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(wfFlowMasterLineBean.added)}" id="wfJobMasterBeanWfJobMasterWfFlowMasterLinesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{wfFlowMasterLineBean.add.wfJobMaster}" value="#{wfJobMasterBean.wfJobMaster}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{wfJobMasterBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty wfJobMasterBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{wfJobMasterBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{wfJobMasterBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>